<%@ page language="java" import="java.util.*"
	contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://www.rapid-framework.org.cn/rapid" prefix="rapid"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%> <!-- 日期格式化 -->


<rapid:override name="frame-header-style">
	<link rel="stylesheet" href="resources/css/index-page.css">
</rapid:override>

<!-- 重写模板framework中name为frame-content的内容 -->
<rapid:override name="frame-content">
	<div class="layui-container">
		<div class="layui-row">
			<div class="layui-col-md6">
				<div id="dashboard_activity" class="postbox ">
					<div class="inside">
						<div id="activity-widget">
							<div id="published-posts" class="activity-block">
								<h3>最近发布</h3>
								<br>
								<ul>
									
									<c:forEach var="a" items="${articleList}">
									<li>
											<span>
												<fmt:formatDate value="${a.articleCreateTime}" pattern="yyyy/MM/dd hh:mm"/>
											</span> 
											<a href="article/content/${a.articleId}" target="_blank">${a.articleTitle}</a>
										</li>
									</c:forEach>
								</ul>
							</div>
							<br>
						</div>
					</div>
				</div>
			</div>
			<div class="layui-col-md6">
				<div id="dashboard_quick_press" class="postbox ">
					<div class="inside">
						<form name="post" method="post" id="insertDraftForm"
							class="initial-form hide-if-no-js"
							action="article/Draft">

							<div class="layui-form-item">
								<div class="layui-input-block">
									<input type="text" name="articleTitle" id="articleTitle"
										required lay-verify="required" placeholder="请输入标题"
										autocomplete="off" class="layui-input">
								</div>
							</div>
							<div class="layui-form-item layui-form-text">
								<div class="layui-input-block">
									<textarea name="articleContent" placeholder="请输入内容"
										id="articleContent" class="layui-textarea" required></textarea>
								</div>
							</div>
							<input type="hidden" name="articleStatus" value="0">
							<div class="layui-form-item">
								<div class="layui-input-block">
									<button class="layui-btn layui-btn-small" lay-submit
										lay-filter="formDemo" onclick="insertDraft()">保存草稿</button>
									<button type="reset"
										class="layui-btn layui-btn-small layui-btn-primary">重置</button>
								</div>
							</div>

						</form>
						<div class="drafts">
							<p class="view-all">
								<a href="article" aria-label="查看所有草稿">查看所有</a>
							</p>
							<h2 class="hide-if-no-js">草稿</h2>
							<ul>
							</ul>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</rapid:override>

<!-- 静态引入模板（一定要放在后面） -->
<%@ include file="framework.jsp"%>